﻿using System;
using System.Collections.Generic;
using IrrlichtLime;
using IrrlichtLime.Core;
using Timed;
using IrrlichtLime.Scene;
using IrrlichtLime.Video;

namespace Iso
{
    public class UIText
    {
        public Texture texture;
        public Vector2Di position;

        public UIText(string text, System.Drawing.Font font, System.Drawing.Color color, Vector2Di position, Dimension2Di size)
        {
            texture = Utility.RenderText(text, size.Width, size.Height, font, new System.Drawing.SolidBrush(color));
            this.position = position;
        }

        public void Draw()
        {
            Engine.device.VideoDriver.Draw2DImage(texture, position, new Recti(0, 0, texture.Size.Width, texture.Size.Height), null, Color.OpaqueWhite, true);
        }

        public void Delete()
        {
            Engine.device.VideoDriver.RemoveTexture(texture);
        }
    }
}
